fix(docs): sanitize the HTML the schema-driven tables inject - #12304
Merged
Conversation
Contributor
Author
|
This pull request is part of a Mergify stack:
|
This was referenced Aug 4, 2026
Contributor
Merge Protections🟢 All 7 merge protections satisfied — ready to merge. Show 7 satisfied protections🟢 ⛓️ Depends-On RequirementsRequirement based on the presence of
🟢 🤖 Continuous Integration
🟢 👀 Review Requirements
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 Reviews
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
kozlek
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/read-documented-enum-values-one-shared-reader--e539de06
branch
from
August 5, 2026 13:05
3c3d836 to
f747840
Compare
kozlek
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/sanitize-html-schema-driven-tables-inject--ce1642f8
branch
from
August 5, 2026 13:05
4455148 to
87b0bd3
Compare
Contributor
Author
Revision history
|
kozlek
marked this pull request as ready for review
August 5, 2026 13:40
kozlek
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/read-documented-enum-values-one-shared-reader--e539de06
branch
from
August 5, 2026 13:52
f747840 to
4b1ec1f
Compare
kozlek
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/sanitize-html-schema-driven-tables-inject--ce1642f8
branch
from
August 5, 2026 13:52
87b0bd3 to
08912d8
Compare
kozlek
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/read-documented-enum-values-one-shared-reader--e539de06
branch
from
August 5, 2026 14:01
4b1ec1f to
b5e84ba
Compare
kozlek
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/sanitize-html-schema-driven-tables-inject--ce1642f8
branch
from
August 5, 2026 14:01
08912d8 to
452a467
Compare
mergify
Bot
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/read-documented-enum-values-one-shared-reader--e539de06
branch
from
August 6, 2026 07:04
b5e84ba to
75807dc
Compare
mergify
Bot
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/sanitize-html-schema-driven-tables-inject--ce1642f8
branch
from
August 6, 2026 07:10
452a467 to
8a5dfdd
Compare
`renderMarkdown` output goes straight into `dangerouslySetInnerHTML` in six tables, and it did not filter URL protocols: `remark-rehype` emits an `<a>` for any link target whatever its scheme, so a `javascript:` link in a synced description would have rendered as a live link. Raw HTML was never a way in — `remark-rehype` runs without `allowDangerousHtml`, so it is discarded before becoming a node — which makes URL filtering the whole of what `rehype-sanitize` adds here. It sits after `rehype-raw` so that if a caller ever does enable `allowDangerousHtml`, the embedded markup is parsed and then sanitized rather than passed through opaque. Every input today is first-party: descriptions generated by our own engine and delivered by our own sync bot. So this is defence in depth rather than a live exposure — but "the input is trustworthy" is a property of the six current callers, not of the function, and the output lands somewhere that makes the distinction expensive to get wrong later. The tests separate the two guarantees on purpose. Asserting all four cases together would have been misleading: three of them pass with the sanitizer removed, because they test the markdown pipeline discarding raw HTML rather than anything the sanitizer does. Only the URL-protocol cases fail if it goes. Output is unchanged across every description the two schemas publish. Part of MRGFY-8330 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Change-Id: Ice1642f855d6698b65a034e398affbce16f822a6
kozlek
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/sanitize-html-schema-driven-tables-inject--ce1642f8
branch
from
August 6, 2026 07:53
8a5dfdd to
49f486e
Compare
kozlek
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/read-documented-enum-values-one-shared-reader--e539de06
branch
from
August 6, 2026 07:53
75807dc to
49cfdd4
Compare
Base automatically changed from
devs/kozlek/devs/kozlek/batch-status-data-type/read-documented-enum-values-one-shared-reader--e539de06
to
main
August 6, 2026 08:12
mergify
Bot
force-pushed
the
devs/kozlek/devs/kozlek/batch-status-data-type/sanitize-html-schema-driven-tables-inject--ce1642f8
branch
from
August 6, 2026 08:12
49f486e to
3e83b56
Compare
remyduthu
approved these changes
Aug 6, 2026
JulianMaurin
approved these changes
Aug 6, 2026
Contributor
Merge Queue Status
This pull request spent 2 minutes 49 seconds in the queue, including 2 minutes running CI. Required conditions to merge
|
62 tasks
mergify
Bot
deleted the
devs/kozlek/devs/kozlek/batch-status-data-type/sanitize-html-schema-driven-tables-inject--ce1642f8
branch
August 6, 2026 08:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
renderMarkdownoutput goes straight intodangerouslySetInnerHTMLinsix tables, and it did not filter URL protocols:
remark-rehypeemits an<a>for any link target whatever its scheme, so ajavascript:link ina synced description would have rendered as a live link.
Raw HTML was never a way in —
remark-rehyperuns withoutallowDangerousHtml, so it is discarded before becoming a node — whichmakes URL filtering the whole of what
rehype-sanitizeadds here. Itsits after
rehype-rawso that if a caller ever does enableallowDangerousHtml, the embedded markup is parsed and then sanitizedrather than passed through opaque.
Every input today is first-party: descriptions generated by our own
engine and delivered by our own sync bot. So this is defence in depth
rather than a live exposure — but "the input is trustworthy" is a
property of the six current callers, not of the function, and the output
lands somewhere that makes the distinction expensive to get wrong later.
The tests separate the two guarantees on purpose. Asserting all four
cases together would have been misleading: three of them pass with the
sanitizer removed, because they test the markdown pipeline discarding raw
HTML rather than anything the sanitizer does. Only the URL-protocol cases
fail if it goes.
Output is unchanged across every description the two schemas publish.
Part of MRGFY-8330
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Depends-On: #12293